const {defineConfig} = require('@vue/cli-service')
const {resolve} = require("node:path");

const path = require('path');
const {fileURLToPath} = require("node:url");
const __dirname = path.dirname(fileURLToPath(import.meta.url));
module.exports = defineConfig({
    transpileDependencies: true, port: 8080,
})
module.exports = defineConfig({
    transpileDependencies: true, devServer: {
        historyApiFallback: true, allowedHosts: 'all'
    }
})
module.exports = {
    devServer: {
        proxy: {
            '/api': {
                target: 'http://localhost:8080', // 后端服务实际地址
                changeOrigin: true, // 是否改变域名
                pathRewrite: {
                    '^/api': '' // 路径重写
                }
            }
        }
    }
}
module.exports = defineConfig({
    transpileDependencies: true,
    devServer: {
        historyApiFallback: true,
        allowedHosts: 'all'
    }
});
